<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
		<title>demo</title>
		<!--[if lt IE 8]>      <![endif]-->
	</head>
	<body >
		<noscript></noscript>
		<script>
			function XHR() {
				var xhr;
				try {
					xhr = new XMLHttpRequest();
				} catch(e) {
					var IEXHRVers = ["Msxml3.XMLHTTP", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];
					for (var i = 0, len = IEXHRVers.length; i < len; i++) {
						try {
							xhr = new ActiveXObject(IEXHRVers[i]);
						} catch(e) {
							continue;
						}
					}
				}
				return xhr;
			}

			var xhr = XHR();
			xhr.open("get", "resouce.html", true);
			xhr.onreadystatechange = function() {
				if (xhr.readyState == 4 && xhr.status == 200) {
					console.log(xhr.responseText);
				}
			};
			xhr.send(null);
		</script>
	</body>
</html>